<template>
	<view>
		<view style="background-color: #FFFFFF;">
			<cu-custom :isBack="true">
				<block slot="backText"></block>
				<block slot="content">{{corpCode}}-上架记录(生产)</block>
			</cu-custom>
		</view>
		<view class="cu-bar bg-white solid-bottom" style="margin-top: 3px;">
			<view class="action">
				<text class="cuIcon-title text-orange "></text> 明细列表
			</view>
		</view>
		<uni-table border stripe emptyText="暂无更多数据" type="selection1">
			<uni-tr>
				<uni-th align="center">条码号</uni-th>
				<uni-th align="center">SKU号</uni-th>
				<uni-th align="center">上架数量</uni-th>
				<uni-th align="center">总数量</uni-th>
			</uni-tr>
			<uni-tr v-for="(item, index) in invUpNum " :key="index">
				<uni-td align="center">{{item.csourcedId}}</uni-td>
				<uni-td align="center">{{item.cinvname}}</uni-td>
				<uni-td align="center">{{item.sjqty}}</uni-td>
				<uni-td align="center">{{item.prtqty}}</uni-td>
			</uni-tr> 
		</uni-table>
	</view>
</template>

<script>
	import uniTable from 'components/uni-table/uni-table.vue';
	import uniTh from 'components/uni-th/uni-th.vue';
	import uniTr from 'components/uni-tr/uni-tr.vue';
	import uniTd from 'components/uni-td/uni-td.vue';
	import {
		mapState
	} from 'vuex';
	export default {
		data() {
			return {
				invUpNum:[],
			}
		},
		computed: {
			...mapState(['hasLogin', 'userInfo', 'auditlist', 'corpCode']),
		},
		onShow() {
			this.loadDAta();
		},
		methods: {
			loadDAta(){
				uni.request({
					url:this.serverURL_a+'/order/App/getMosjl',
					data:{
						__sid:this.userInfo.sessionid
					},
					header: {
						'content-type': 'application/x-www-form-urlencoded;charset=utf-8',
					},
					method: 'POST',
					success:function(data){
						var repMaps = data.data;
						if(repMaps.code = '1001'){
							this.invUpNum = repMaps.resMap;
						}else{
							uni.showModal({
							    content: repMaps.msg,
								showCancel:false,
							});
							return;
						}
					}.bind(this),
					fail:function(){
						this.$api.msg('服务已停止,请稍后再试');
						return;
					}.bind(this),
				});
			},
		}
	}
</script>

<style>
	.uni-input {
		height: 59px;
		padding: 15px 25px;
		line-height: 51px;
		font-size: 28px;
		background: #FFF;
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		flex: 1;
		text-align: left;
	}
	
	.uni-form-item .title {
		padding: 10px 25px;
		text-align: left;
	}
	
	uni-radio::before,
	uni-checkbox::before {
		/*  font-family: "cuIcon";
	    content: "\e645";
	    position: absolute; */
		color: #ffffff !important;
		top: 50%;
		margin-top: -8px;
		right: 5px;
		font-size: 32px;
		line-height: 16px;
		pointer-events: none;
		-webkit-transform: scale(1, 1);
		transform: scale(1, 1);
		-webkit-transition: all 0.3s ease-in-out 0s;
		transition: all 0.3s ease-in-out 0s;
		z-index: 9;
	}
	uni-switch .wx-switch-input::before,
	uni-radio.radio::before,
	uni-checkbox .wx-checkbox-input::before,
	uni-radio .wx-radio-input::before,
	uni-switch .uni-switch-input::before,
	uni-radio.radio::before,
	uni-checkbox .uni-checkbox-input::before,
	uni-radio .uni-radio-input::before {
		display: block;
	}

	.cu-dialog {
		position: relative;
		display: inline-block;
		vertical-align: middle;
		margin-left: auto;
		margin-right: auto;
		width: 696px;
		max-width: 100%;
		background-color: #f8f8f8;
		border-radius: 10px;
		overflow: hidden;
		margin-top: 46rpx;
	}
</style>
